import java.util.Scanner;

public class demo3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        boolean flg;
        do {
            flg = true;
            StringBuilder stringBuilder = new StringBuilder();
            int n = s.length();
            for (int i = 0; i < n; i++) {
                if (i < n - 1 && s.charAt(i) == s.charAt(i + 1)) {
                    flg = false;
                    i++;
                } else {
                    stringBuilder.append(s.charAt(i));
                }
            }
            s = stringBuilder.toString();
        } while (!flg);

        System.out.println(s);
        }
    }
